package yhao.demo.service.erp.workflow.apilist.restful;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import yhao.demo.service.erp.workflow.apilist.form.task.*;
import yhao.demo.service.erp.workflow.apilist.model.task.TaskModel;
import yhao.infra.apilist.RequestResult;
import yhao.infra.apilist.validate.IdForm;
import yhao.infra.common.model.Pagination;

/**
 * Created by yoara on 2018/11/15.
 */
@FeignClient(ZoneConstants.FEIGN_URL)
public interface TaskFeign {
    @PostMapping(value = "/task/startNewTask")
    RequestResult<TaskStartForm> startNewTask(TaskStartForm form);

    @PostMapping("/task/stopTask")
    RequestResult<IdForm> stopTask(IdForm form);

    @PostMapping("/task/pickTask")
    RequestResult<TaskModel> pickTask(IdForm form);

    @PostMapping("/task/dealTask")
    RequestResult<Boolean> dealTask(TaskDealForm form);

    @PostMapping("/task/passTask")
    RequestResult<Boolean> passTask(TaskDealPassForm form);

    @PostMapping("/task/refuseTask")
    RequestResult<Boolean> refuseTask(TaskDealRefuseForm form);

    @PostMapping("/task/queryTask")
    RequestResult<Pagination<TaskModel>> queryTask(TaskQueryForm form);
}
